<template>
  <div class="main">
    <Nav @sendState="sendState"/>
    <InputView  :userMessage="userMessage" @receiveMessage="receiveMessage" />
    <rightCot v-bind="$attrs"/>
  </div>
</template>

<script>
import Nav from "./nav";
import InputView from "./InputView"
import rightCot from "./rightCot"
export default {
  props: ['userMessage'],
  inheritAttrs:true,
  components: {
    Nav,
    InputView,
    rightCot
  },
  methods: {
    sendState() {
      this.$emit("changeOnline", true);
    },
    receiveMessage(msg) {
      this.$emit("sendMessage",msg)
    }
  }
};
</script>

<style scoped>
.main {
    position: fixed;
    z-index: 5;
    min-width: 1200px;
    min-height: 700px;
    width: 100%;
    top: 40px;
    height: calc(100% - 40px);
}
</style>